
import service from "../index"
import baseUrl from "./base"
import {SearchListFormDataType} from "../../viewModel/customerManage/customerManage"
import {submitDataType} from "../../viewModel/customerManage/addCustomerInfo"
// 分页查询
export const findcustomerinfolist = (data:SearchListFormDataType) => {
    return service({
        method: "POST",
        url: baseUrl.Findcustomerinfolist,
        data: data
    })
}

// 新增客户
export const addCustomerInfoData = (data: submitDataType) => {
    return service({
        method: "POST",
        url: baseUrl.crateUrl,
        headers: {
            showTips: true
        },
        data: data,
    })
}

// 编辑客户
export const upDateCustomerInfoData = (data: submitDataType) => {
    return service({
        method: "POST",
        url: baseUrl.updateUrl,
        headers: {
            showTips: true
        },
        data: data,
    })
}

// 查询行业下拉框
export const customerInfoIndustry = () => {
    return service({
        url: baseUrl.Industry
    })
}

// 获取数据的详情
export const getCustomerInformDetail = (id:string) => {
    return service({
        method: "GET",
        url: baseUrl.Selectone,
        params: {
            customerInfoId: id
        }
    })
}


